package demo23;

import java.util.Arrays;

public class Main {
    public static void main(String[] args){
        int []array={2,3,9,5,4,0,10,7,8,1};
        Sort2 s=new Sort2();
        System.out.println("递归归并排序前:");
        System.out.println(Arrays.toString(array));
        System.out.println("递归归并排序后：");
        s.mergeSort(array);
        System.out.println(Arrays.toString(array));
        int []array1={3,6,90,45,12,36,78};
        System.out.println("非递归排序前：");
        System.out.println(Arrays.toString(array1));
        System.out.println("非递归归并排序后");
        s.mergeSortNor(array1);
        System.out.println(Arrays.toString(array1));

        System.out.println("计数排序排序聚集数：");
        int[]array3={3,3,6,6,4,4,9,9,9,1,2};
        System.out.println("原数组：");
        System.out.println(Arrays.toString(array3));
        System.out.println("排序后的数组：");
        Sort3 s2=new Sort3();
        s2.countSort(array3);
        System.out.println(Arrays.toString(array3));
    }
}
